<template>
  <div>
    <h3>HookDemo</h3>
    <p>loading {{ loading }}</p>
    <p>data {{ data }}</p>
    <p>err {{ err }}</p>
  </div>
</template>

<script setup lang="ts">
import useRequest from "@/hooks/useRequest";

const { loading, data, err } = useRequest(
  "http://127.0.0.1:5173/data/data.json",
  // "https://www.baidu.com"
  "GET"
);
</script>

<style scoped></style>
